package net.lab1024.sa.admin.module.users.equipmentmanage.service;

import java.util.List;

import net.lab1024.sa.admin.module.fabricmaterials.dao.FabricMaterialsDao;
import net.lab1024.sa.admin.module.fabricmaterials.domain.vo.FabricMaterialsVO;
import net.lab1024.sa.admin.module.users.equipmentmanage.dao.EquipmentManageDao;
import net.lab1024.sa.admin.module.users.equipmentmanage.domain.entity.EquipmentManageEntity;
//import net.lab1024.sa.admin.module.users.equipmentmanage.domain.form.EquipmentManageAddForm;
import net.lab1024.sa.admin.module.users.equipmentmanage.domain.form.EquipmentManageQueryForm;
//import net.lab1024.sa.admin.module.users.equipmentmanage.domain.form.EquipmentManageUpdateForm;
import net.lab1024.sa.admin.module.users.equipmentmanage.domain.vo.EquipmentManageVO;
import net.lab1024.sa.base.common.util.SmartBeanUtil;
import net.lab1024.sa.base.common.util.SmartPageUtil;
import net.lab1024.sa.base.common.domain.ResponseDTO;
import net.lab1024.sa.base.common.domain.PageResult;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 实训室设备管理 Service
 *
 * @Author 王俊权
 * @Date 2024-11-14 16:13:22
 * @Copyright 🐂🐎bloc
 */

@Service
public class EquipmentManageService {




    @Resource
    private EquipmentManageDao equipmentManageDao;

    /**
     * 分页查询
     *
     * @param queryForm
     * @return
     */
    public PageResult<EquipmentManageVO> queryPage(EquipmentManageQueryForm queryForm) {
        Page<?> page = SmartPageUtil.convert2PageQuery(queryForm);
        List<EquipmentManageVO> list = equipmentManageDao.queryPage(page, queryForm);
        PageResult<EquipmentManageVO> pageResult = SmartPageUtil.convert2PageResult(page, list);
        return pageResult;
    }


    //获取所有可用设备
    public List<EquipmentManageVO> queryEquipment(Integer statusCode) {
        return equipmentManageDao.queryEquipment(statusCode);
    }


}
